﻿package Engine.RMI
{
    import Framework.Util.*;
    import flash.events.*;

    public class RMIDispatcher extends EventDispatcher
    {
        private static var _instance:RMIDispatcher;

        public function RMIDispatcher(param1:ConstructorBlock)
        {
            if (_instance != null)
            {
                throw new Error("Only one RMIDispatcher instance should be instantiated");
            }
            return;
        }// end function

        public function dispatchErrorEvent(param1:Exception) : void
        {
            var _loc_2:* = new RMIEvent(RMIEvent.RMI_ERROR, false, false, param1);
            dispatchEvent(_loc_2);
            return;
        }// end function

        public static function getInstance() : RMIDispatcher
        {
            if (_instance == null)
            {
                _instance = new RMIDispatcher(new ConstructorBlock());
            }
            return _instance;
        }// end function

    }
}

class ConstructorBlock extends Object
{

    function ConstructorBlock()
    {
        return;
    }// end function

}

